var PageSize = 6

var page = new Pagin({
	el: "#myPage", //绑定分页div
	dataSize: app.ulist.length, //数据量
	pageSize: PageSize, //每页数量
	func: function () {
		//触发事件
		// alert(PaginJson.pageIndex)
		app.plist = getUserMsg(PaginJson.pageIndex, PageSize)
	}
})

//创建滚动加载
var rollLoad = new RollLoad(function () {
	//触发事件
	// salert("我已经到底部啦！")
})

function getUserMsg(pageIndex, PageSize) {
	var userList
	$.ajax({
		url: "http://47.102.45.219:8080/Appoint/editUserServlet/getUsersPagin",
		data: {
			"pageIndex": pageIndex,
			"pageSize": PageSize,
		},
		global: false,
		type: "POST",
		dataType: "json",
		xhrFields: {
			withCredentials: true
		},
		async: false,
		success: function (data) {
			userList = data.data
		},
		error: function (XMLHttpRequest, textStatus, errorThrown) {

		}
	})
	return userList
}